package com.fhz.day004;

/**
 * 时间:2022/3/23
 *
 * @author msfeng
 * 简述: TODO
 */
public class User {

    String name;
    int age;
    String email;
    String address;


    private User() {
    }

    public User(String name, String email) {
        this.name = name;
        this.email = email;
    }

    public static class Builder {

        String name;
        int age;
        String email;
        String address;

        public Builder setName(String name) {
            this.name = name;
            return this;
        }

        public Builder setAge(int age) {
            this.age = age;
            return this;
        }

        public Builder setEmail(String email) {
            this.email = email;
            return this;
        }

        public Builder setAddress(String address) {
            this.address = address;
            return this;
        }

        public User build(){
            User user = new User();
            user.address = address;
            return user;
        }
    }


    public static void main(String[] args) {

    }
}

